Skip to content

Conversation

@pdobbelaere
Copy link
Collaborator

@pdobbelaere pdobbelaere commented Aug 11, 2025

TL;DR

  • implemented ORCA reference method
  • converted D3 dispersion into a Function / Hamiltonian
  • shuffled the flow of reference apps around a bit
  • made reference execution options slightly more flexible

GENERAL

  • Subclasses of Reference now have more evaluation options (behaviour of computeunchanged):
    reference.evaluate(self, geometry: Geometry | AppFuture) -> AppFuture[Geometry] and
    reference.compute_dataset(self, dataset: Dataset) -> Dataset
  • Failed single points should always return the input Geometry with its data reset. If that does not happen, you have found a bug. Fixes NaN energy written to xyz after failed CP2K evaluation #77 (hopefully).
  • In the execution config, every reference block accepts new args: container_uri, mpi_command, mpi_args and executable. These replace the removed launch_command option. See e.g., the 'local_test.yaml' config.

ORCA
Psiflow workflows can now use ORCA to evaluate molecules. A simple example could be

from psiflow.reference import ORCA

orca_input = "! EnGrad HF def2-SVP"
orca = ORCA(orca_input)
future = orca.evaluate(geometry)  # AppFuture[Geometry]

where orca_input is any valid ORCA input file (as a string). You do not have to specify %maxcore, %pal or *xyz [...] * options; they will be filled in automatically. If you do supply e.g., %maxcore 2000, that option will not be overwritten.

Note that the default output parser will only work for single point calculations (no optimisations, hessians, etc..). If you need this functionality, feel free to open an issue.

Also, we currently do not have an ORCA container yet, so psiflow assumes the orca executable can be found in your PATH (does which orca work?).

D3
Dispersion corrections using simple-dftd3 became a Function / Hamiltonian, mostly because the library is easy to control in pure Python (apps), and every ab initio code has its own dispersion implementation anyway. Usage like any Hamiltonian:

from psiflow.hamiltonians import D3Hamiltonian

hamiltonian = D3Hamiltonian(method="PBE", damping="d3bj")
futures = hamiltonian.compute(dataset, "energy", "forces", "stress")

Simple-dftd3 can use OpenMP threading with OMP_NUM_THREADS, but that does not seem to work out of the box. We probably need some specific compilation setup.

@pdobbelaere pdobbelaere merged commit 78a77fb into molmod:main Sep 3, 2025
1 check passed
@pdobbelaere pdobbelaere deleted the orca branch September 3, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NaN energy written to xyz after failed CP2K evaluation

1 participant